package cn.bx.film.ctrl;



import cn.bx.film.entity.FilmType;
import cn.bx.film.service.FilmTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("filmtype")
public class FilmTypeController {
    @Autowired
    private FilmTypeService filmTypeService;

    @RequestMapping(value = "findtypes",produces="application/json;charset=UTF-8")
    @ResponseBody
    public List<FilmType> findTypes(){
        List<FilmType> list = this.filmTypeService.findALL();
        return list;
    }
}
